package com.game.spacetrader.data;


import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.os.StrictMode;
import android.view.Gravity;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;

/**
 * DataTest.java Handles logging to screen
 * @Version 1.0 October 31,2012
 * @author APatel
 */
public class DataTest extends Activity {
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		ScrollView sView = new ScrollView(this);
		sView.setBackgroundColor(Color.rgb(0,0,0));
		TextView myText = new TextView(this);
		myText.setTextColor(Color.rgb(124,252,0));
		String a = "";
		myText.setText(a);
		sView.addView(myText);
		setContentView(sView);
		myText.append("DB On Screen Log Initialized\n");
		//Code to be executed for on screen logging
	    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
	    StrictMode.setThreadPolicy(policy);
		Data universedb = new Data("universe.db");
		myText.append(universedb.debugView());
	}
	
}
